<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <title>订单记录</title>

    <div th:replace="common_cssjs"></div>
    <script th:src="@{/js/order.js}" type="text/javascript"></script>
</head>

<body>
<div th:replace="common/header::nav"></div>
<div class="container">
    <div th:replace="common/adminNav::user"></div>
    <div class="row">
        <table class="table table-responsive table-striped">
                <thead>
                <tr>
                    <td>订单日期</td>
                    <td>订单编号</td>
                    <td>订单金额</td>
                    <td>订单状态</td>
                    <td>收件人</td>
                    <td>操作</td>
                </tr>
                </thead>
                <tbody>
                    <tr th:each="order : ${page.result}" th:pid="${order.id}" th:switch="${order.status}">
                        <td th:text="${order.createTime}"></td>
                        <td th:text="${order.orderNumber}"></td>
                        <td th:text="${order.finalPrice}"></td>
                        <td>
                            <span th:case="'0'">等待付款</span>
                            <span th:case="'1'">等待发货</span>
                            <span th:case="'2'">已发货</span>
                            <span th:case="'3'">已取消</span>
                            <span th:case="'4'">已完成</span>
                        </td>
                        <td th:text="${order.consignee}"></td>
                        <td th:switch="${order.status}">
                            <a class="btn btn-info btn-xs" th:href="@{'/admin/order/view/'+${order.id}}">查看</a>
                            <span th:case="'0'">  <a class="btn btn-info btn-xs pay-order-btn">付款</a> <a class="btn btn-info btn-xs cancel-order-btn">取消订单</a></span>
                            <span th:case="'1'"> <a class="btn btn-info btn-xs cancel-order-btn">取消订单</a></span>
                            <span th:case="'2'"> <a class="btn btn-info btn-xs confirm-order-btn">确认收货</a></span>
                        </td>
                    </tr>
                </tbody>
        </table>
    </div>
<!--    <div class="text-center">-->
<!--        <tags:pagination page="${page}" paginationSize="${page.pageSize}"/>-->
<!--    </div>-->
</div>
<!-- /container -->
<div th:replace="common/footer::copy"></div>
</body>
</html>